import { reqGetHotList } from '@/api/List'
import { GET_HOT_LIST } from './hotlist'

export default {
  namespaced: true,
  state: {
    hotList: []
  },
  actions: {
    async getHotList({ commit }) {
      const follow = await reqGetHotList()
      commit('GET_HOT_LIST', follow)
    }
  },
  mutations: {
    [GET_HOT_LIST](state, follow) {
      state.hotList = follow.data.dailySongs.splice(0, 30)
    }
  }
}
